package com.wegis.demo.controller;

import com.wegis.demo.service.IFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * description: FileController
 * date: 2021/7/25 0:28
 * author: asus
 * version: 1.0
 */
// hasjfdlkh
 // 好好计划落空
@RestController
@CrossOrigin("*")
public class FileController {
    @Autowired
    private IFileService iFileService;

    @PostMapping("/file/upload")
    public Map<String,Object> uploadFile(MultipartFile file) {
        return iFileService.uploadFile(file);
    }
}
